home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 16 / PC Actual CD 16.iso / autocad / R14701.DXR / 00006_ButtonAncestor.ls < prev    next >
Encoding:
Text File  |  1997-04-24  |  1.3 KB  |  53 lines

  1. property pButtonObj, pHilitedFlag
  2.  
  3. on new me, myButtonObject
  4.   set pButtonObj to myButtonObject
  5.   set pHilitedFlag to 0
  6.   return me
  7. end
  8.  
  9. on stepFrame me
  10.   mCheckButtonRollover(me)
  11. end
  12.  
  13. on mCheckButtonRollover me
  14.   if the memberNum of sprite the pSpriteNum of pButtonObj = (the pFirstMemberNum of pButtonObj + 2) then
  15.     exit
  16.   end if
  17.   if rollOver(the pSpriteNum of pButtonObj) then
  18.     if not pHilitedFlag then
  19.       mHiliteButton(me)
  20.     end if
  21.   else
  22.     if pHilitedFlag then
  23.       mResetButton(me)
  24.     end if
  25.   end if
  26. end
  27.  
  28. on mHiliteButton me
  29.   set the memberNum of sprite the pSpriteNum of pButtonObj to the pFirstMemberNum of pButtonObj + 1
  30.   set pHilitedFlag to 1
  31. end
  32.  
  33. on mResetButton me
  34.   set the memberNum of sprite the pSpriteNum of pButtonObj to the pFirstMemberNum of pButtonObj
  35.   set pHilitedFlag to 0
  36. end
  37.  
  38. on cursorReset me, mySpriteNum
  39.   set the cursor of sprite mySpriteNum to 0
  40. end
  41.  
  42. on handCursorSet me, mySpriteNum
  43.   set the cursor of sprite mySpriteNum to [the number of member "hand1", the number of member "hand2"]
  44. end
  45.  
  46. on playCursorSet me, mySpriteNum
  47.   set the cursor of sprite mySpriteNum to [the number of member "play1", the number of member "play2"]
  48. end
  49.  
  50. on pauseCursorSet me, mySpriteNum
  51.   set the cursor of sprite mySpriteNum to [the number of member "pause1", the number of member "pause2"]
  52. end
  53.